Check out a description and source at Github.
This website was built with Hyde. Hyde is a static site generator written in Python. Static websites are faster to serve, easier to maintain and to extend.
I will provide the source code soon for you to have a look how I set everything up. As the current version of Hyde is sparsely documented I hope this will be of help.
Dojo XHR response code handling patch
This small js file monkey patches Dojo’s original xhr function to globally and synchronously handle server side responses with different status codes other than 200.
For example, if your server session has timed out, this patch allows you to display a login screen and after a successful authentication to automatically re-send the original xhr call to resume the application without any further interruption.