added support for single page apps