Changed registerUser method to static