upgraded registrationController and loginController