Removed doLogout on window close

Removed doLogout on window closing due to browser incompatibility