fix logout after login