Fix Issue #WM-4839(Postgres db security is failing? ).
 -- Corrected db queries when fetching authorities for the logged in user and sending username instead of userId for username field in WMUser