diff --git a/site-api.go b/site-api.go index 9e5f6d0..1f6c82e 100644 --- a/site-api.go +++ b/site-api.go @@ -57,9 +57,11 @@ func greetUser(w http.ResponseWriter, r *http.Request) { defer log.PanicSafe() log.LogInfo(fmt.Sprintf("%s called greetUser", getSessionIdentifier(r))) loggedIn, username := detectUser(r, "greetUser") - fmt.Fprintf(w, pageBuilder(r, "home")) + if loggedIn { fmt.Fprintf(w, strings.Replace(bodyWrapper(r, "loggedIn"), "$USER", username, -1)) + } else { + fmt.Fprintf(w, pageBuilder(r, "home")) } }