Fixed a bug in OmH authenticate.

The Open mHealth authenticate API had a bug when certain invalid credentials were given. This has been fixed.

Closes #504