forceLogout method for tests