fixed below issues:
- can not obtain messages when search condition 'futureThan' or
  'pastThan' were assigned.
- 'ok' was returned when authentication was failed.