Ensure logout after login