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