Changed login and project controller to accept json requests.