Move code in LoginViewController