My application returns both html pages (jsp) and json result. When a user is not logged in they are redirected to the login page which is a html page. This makes sense for t