Added comments to logout method