template variable cleanup

removed `$institution_name` and `$user_id` template variables.

replaced them where applicable by reading the appropriate value from the user session store, or the global configuration.

removed a variety of other unused variables from the controller actions while at it.