Use cookie to share session with the client