outsourced authentication into AuthenticationController and AuthenticationService, refactored MailCredentials