gave session a default value of -1

Otherwise it would fail on login if you hadn't made a session before.