func (sm *SManager) UpdateSession(id string) {
	s := mgr.activeSessions[id]
	s.lastActive = time.Now()
	mgr.activeSessions[id] = s
}
UpdateSession sets lastActive date and time
package sess
import (
	"bufio"
	b64 "encoding/base64"
	"io"
	"log"
	"math/rand"
	"os"
	"strings"
	"time"
	"golang.org/x/crypto/bcrypt"
)
type session struct {
	username   string
	browser    string
	ip         string
	lastActive time.Time
}
type user struct {
	password       string
	dateRegistered time.Time
}
type manage struct {
	activeSessions  map[string]session
	registeredUsers map[string]user
}
var mgr manage
type SManager string
func NewManager() *SManager {
	mgr = manage{
		activeSessions:  map[string]session{},
		registeredUsers: map[string]user{},
	}
	sm := SManager("")
	sm.open()
	return &sm
}
func (sm *SManager) RegisterUser(un, pw string) {
	newUser := user{password: pw, dateRegistered: time.Now()}
	mgr.registeredUsers[un] = newUser
}
func (sm *SManager) ValidateUser(id string) bool {
	_, ok := mgr.registeredUsers[id]
	return ok
}
func (sm *SManager) LoginSession(un, br, ipAddr string) string {
	s := &session{username: un, browser: br, ip: ipAddr, lastActive: time.Now()}
	id := ("random session id")  
	mgr.activeSessions[id] = *s
	return id
}