Added handling of oauthexception in rest server command
Separated the registration from the authentication process.
Added oauth test (in progress)