reordered user creation to appropriate place