Make sure the endpoint /gs/updatelayers pass a user object

gs_slurp crashes if there is no proper username passed to it. So this PR enables /gs/updatelayers to either pass a user if it is specified in the request and if not to use the logged user which should always exist as this view require to be logged in.