implemnt logout, next secure the resource