Support for custom dialog content

Quick hack to support custom dialog content.
Example added in DialogTest.
![login_dialog](https://f.cloud.github.com/assets/2960714/422476/ca11c414-ad28-11e2-8c67-46369b443823.png)