session logic continued