Completely rewrite CLI URLs login with trial and error

Ticket:	#3637