Refactor locations and users handling functions.

1. Extract functions to show a user and show a location.
2. Create location info only for an active location (the
   refresh is called each time a new location is activated,
   so location info for not active location is always recreated).