adding session data and log out functionality

still a little buggy