Auth fails even with valid users - fault with the sha1 routine somewhere