added session handling to login/logout