Fixed crash on login with invalid details