[EXT-144] Fix url_type to allow dashes

backport url_type checking allowance from WP-VIP
[EXT-144] bad request instead of server error

change from 500 error to 400 error
Merge pull request #5 from janrain/ext144

[EXT-144] Fix url_type to allow dashes