Fix URL parsing in session.js