Fixed session login and persistance; revised tests