updated genericAuthenticationMethod() to allow raw json return