Currently, no matter what you do, during the login process you always get an HTML response. That's nice if you have a browser, or render the pages directly, but if you are working from an app, this is not exactly the best way to handle things, especially…