fix session and flash logOut error