ೝূ͋Γ login :required # HTTPSඞਢ secure: always func login(w http.ResponseWriter, r *http.Request) { ctx := appengine.NewContext(r) u := user.Current(ctx) if u == nil { url, _ := user.LoginURL(ctx, "/") fmt.Fprintf(w, `<a href="%s">Sign in or register</a>`, url) return } url, _ := user.LogoutURL(ctx, "/") fmt.Fprintf(w, `Welcome, %s! (<a href="%s">sign out</a>)`, u, url) }