Make sure the endpoint /gs/updatelayers pass a username

gs_slurp crashes if there is no proper username passed to it. So this PR enables /gs/updatelayers to either pass a username 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.