This is most likely due to timeout settings. You need to change the following file:
defaults.inc.php:
// Session lifetime in minutes
$config['session_lifetime'] = 30;
Like you, I have a similar autologon component integrated for my website. You should set the above parameter longer than your cookie timeout if you're using cookies, that way your website (if you're using it in that manner) times out before the mail.
Good luck.
-Jim