Added authentication and permission systems.