Added $categories in to slim.before.despatch hook
Fixed bug in logging out admin user.