generate url only once
Merge pull request #1941 from owncloud/session_heartbeat

generate url only once for heartbeat