Login with API works, added error for login