refactoring for rememberme- default authentication with text/application-json