A few bug fixes and code optimization.

  • Now there is a setting to let users log in with usernames rather than emails.
  • A few bug fixes and code optimization.