Fix api routes for session control. Fix header view to bind to a preloaded element.