func userLoginSubmit(w http.ResponseWriter, r *http.Request) { user := new(User) user.fromRequest(r) if !user.passwordOk() { fmt.Fprintln(w, "bad password dude") } session.Get(w, r).Authenticate() route.Redirect(w, r, "meat.list") }
func userLogout(w http.ResponseWriter, r *http.Request) { session.Get(w, r).Logout() route.Redirect(w, r, "user.login") }