* modified login func