put all methods related to login together