Allow basic auth in url. Improve regex. Add tests.