UserSession backend code implemented