added error handling of student registering with email address