made server_url case sensitive
remove trailing slash from server_url before entering in database, make lookup trailing-slash-insensitive
Merge pull request #617 from MartijnR/master

fixes for less common server url variations