Added auth key checking code using SHA512