attempt 2, fix session issues for authentication