#4629 Problem with custom SQL queries using cookie authentication

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Merge branch 'QA_4_3'