create session for log in and out