RPS-781: Updated passwords query for authentication