Fixed bug causing multiple cookies and rows in sessions table.