Login controller now accepts JSON instead of form data