share session backend and frontend