oAuth authorization by code + small fixes in routers