added error checking for creating and joining user