Pass g.user down to the javascript level so that javascript knows the authenticated user.