fixed bug where user with NULL session data could access the admin interface. Also improved comments of function descriptions.