refs #5286 - moved oauth server initialization to oauth.js - moved generateAccessToken() to oauth.js - added tests