did all the login stuff