SSOEndpoint Fix

Fix the SSO cookie parsing code.
Unit tests for the view samples.