Adding session and locking capabilities