Fix logout timeout, add appcache manifest, small code formatting.