JS helper now redirects to 'logged_in' to continue the login process. Also simplified the JS helper by looking up the came_from in python.