Get the password properly from prompt_password function

Ticket:	#6152