Refactoring REST routes. Adding REST API for connected user.