fix autologout to be smarter, preserve authname