added socket authorization method and tests
fixes
updated auth example