Implemented access control with session.