added server -> client handling for oauth
 removed router, fixed undefined variable issues