[866092] Deleted redundant code in client-side SSO js, and renamed some methods for readability