Implemented portal locking system.