add jobs#log_tail_follow
[arvados.git] / services / api / app / controllers / application_controller.rb
index 33f92ecbe45fb3821ac606b6c6261090e2a79456..0335bed9fb774a6414dfb43c6a976525477b193f 100644 (file)
@@ -209,12 +209,12 @@ class ApplicationController < ActionController::Base
   def login_required
     if !current_user
       respond_to do |format|
-        format.html  {
-          redirect_to '/auth/joshid'
-        }
         format.json {
           render :json => { errors: ['Not logged in'] }.to_json, status: 401
         }
+        format.html  {
+          redirect_to '/auth/joshid'
+        }
       end
     end
   end