func AddValue(session *sessions.Session, key string, value interface{}) {
	session.Values[key] = value
}
AddValue adds a key value pair to a session
don't forgot to save the session after adding values to it!
this doesn't save automatically in case you are adding lots of new values to a session...b/c saving after every add would be pointless instead of just saving once
package sessionutils
import (
	"errors"
	"log"
	"net/http"
	"strings"
	"github.com/gorilla/sessions"
)
type config struct {
	SessionAuthKey    string  
	SessionEncryptKey string  
	SessionLifetime   int     
	CookieDomain      string  
}
var Config = config{
	SessionAuthKey:    "",
	SessionEncryptKey: "",
	SessionLifetime:   7,    
	CookieDomain:      "/",  
}
const (
	authKeyLength    = 64
	encryptKeyLength = 32
)
var (
	errAuthKeyWrongSize   = errors.New("session: Auth key is invalid. Provide an auth key in app.yaml that is exactly 64 bytes long")
	errEncyptKeyWrongSize = errors.New("session: Encrypt key is invalid. Provide an encrypt key in app.yaml that is exactly 32 bytes long")
	errInvalidSessionLifetime = errors.New("session: Lifetime must be an integer greater than 0")
)
var sessionCookieName = "cc_app_session_id"
var store *sessions.CookieStore
var options = &sessions.Options{
	Domain: ".",
	Path:   "/",
	MaxAge: 60 * 60 * 24 * 7,
	HttpOnly: true,
	Secure: false,
}
func SetConfig(c config) error {
	authKey := strings.TrimSpace(c.SessionAuthKey)
	if len(authKey) != authKeyLength {
		return errAuthKeyWrongSize
	}
	encryptKey := strings.TrimSpace(c.SessionEncryptKey)
	if len(encryptKey) != encryptKeyLength {
		return errEncyptKeyWrongSize
	}
	s := sessions.NewCookieStore(
		[]byte(authKey),
		[]byte(encryptKey),
	)
	if c.SessionLifetime < 1 {
		log.Fatalln("Session lifetime is invalid.  It must be an integer greater than 0.")
		return errInvalidSessionLifetime
	}
	options.MaxAge = 60 * 60 * 24 * int(c.SessionLifetime)
	options.Domain = c.CookieDomain
	s.Options = options
	store = s
	Config = c
	return nil
}
func Get(r *http.Request) *sessions.Session {
	session, _ := store.Get(r, sessionCookieName)
	return session
}