Sessions implemented, logout function is untested.