Session timeout / regenerate

Credit to Gumbo: http://stackoverflow.com/users/53114/gumbo