authentication works but encryption is VERY BUGGY