func (c *Client) TimeToEndOfSession() int {
	t := c.ExpireDate.Sub(time.Now().Local()).Seconds()
	if t <= 0 {
		return 0
	}
	return int(t)
}
TimeToEndOfSession returns the amount of time (seconds) left before the end of
the current user session.
package gelada
import (
	"crypto/subtle"
	"errors"
	"fmt"
	"html/template"
	"net/http"
	"regexp"
	"strings"
	"time"
	"github.com/gorilla/sessions"
)
type AuthProviderType func(user, password string) bool
type Gelada struct {
	options    *Options
	store      *sessions.CookieStore
	exceptions []*exception
}
type exception struct {
	Rule    *regexp.Regexp
	RawRule string
}
type Options struct {
	Path     string
	Domain   string
	MaxAge   int
	Secure   bool
	HTTPOnly bool
	SessionName string
	SessionLifeTime int
	SessionKeys [][]byte
	BindUserAgent bool
	BindUserHost bool
	LoginRoute string
	LoginUserFieldName     string
	LoginPasswordFieldName string
	PostLoginRoute string
	LogoutRoute string
	PostLogoutRoute string
	GorillaCookieStore *sessions.CookieStore
	AuthProvider AuthProviderType
	Exceptions []string
	AuthGuard AuthGuard
	UnauthorizedHeaderName string
}
type AuthGuard interface {
	Check(username string, req *http.Request) bool
	Complaint(username string, req *http.Request)
}
type Client struct {
	Username   string
	UserAgent  string
	UserHost   string
	LoginDate  time.Time
	ExpireDate time.Time
	gelada  *Gelada
	session *sessions.Session
}