Changed authentication again to support searching by username or email