Cleaned up PHP session code.