login gets user from database