fixed user save on login/logout