tidied up sessions controller a little