Fixed issue where the admin section crashes when user is not logeed in