Fix HTTP return code for unauthorized API requests

Ticket:	#5355