better app url handling
Merge pull request #2776 from sebv/app-url

Better app url handling