add user to database when logging in