modified the logout