Use >>= instead of Lwt.bind
Handle IPv6 and scheme of url