refactor user for login
refactor user for login