Moved checkLogin() from account to main