Updated authenticationand registration to use Username rather than email address