modified for login