tweak msg creations and use url_for method to generate urls
Merge pull request #2 from Elbandi/master

tweak msg creations and use url_for method to generate urls