save user to db when logging in