Updated session to use ids not key