Updated login endpoint to be authenticated.