Working on logout and requireLogin