fix the toggle laggy issue with login menu