Fixed a bug in OmH authenticate.

References #504