Updated methods using userByUsername and userByEmail
* Updated methods to account for undefined being returned when
  a user is not found, instead of an error being thrown.
* This fixes issues with an error being thrown in console when trying to
  log in  with an non-existent username.
* This prevents errors being thrown by api when a user is not found