Fix the logout api, add permissions to some buttons that needed them