code: func (service *Service) HomePage(w http.ResponseWriter, request *http.Request) {
  
  	loggedinuser, err := service.GetLoggedInUser(request, w)
  	if err != nil {
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  	}
  	if loggedinuser == "" {
  		service.ShowPublicSite(w, request)
  		return
  	}
  
  	htmlData, err := html.Asset(homepageFileName)
  	if err != nil {
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  	}
  	sessions.Save(request, w)
  	w.Write(htmlData)
  }
docs: //HomePage shows the home page when logged in, if not, delegate to showing the public website