Moved additional functionality into oauth2 server