Fixed a couple queries
working on session stuff added
working on session stuff added