Change user_id query to external_id to allow proper login after user creation