add user and session code