Authentication. Returns JSON with message and appropriate status codes in all circumstances.
Tests for the ES model.