Re-engineering Web Applications from MSO to SSO