cleanup and login