add missing ; to please jshint
use min version of lib when possible
rename env to target, remove magic number "PRODUCTION"
implement registration
refactor navbar out as a component
add TestToken API
use eventEmitter + mixins for auth

Use a global (yuck!) `emitter` object that can now fire `login` events.
An `AuthMixin` mixin provides authentication-related functionalities,
which include adding a listener that calls `setState` on a component to
re-render its view when a `login` event is fired.

It's ugly, I know. For now that's all I've come up with...
add logout API, add put() after generating token to actually save the change
fix client auth + add logout

- Implement logout on client side
- Use localStorage instead of sessionStorage for more persistent state
- Fix some stupid bug that has something to do with React lifecycle. To
  be more specific: a listener function of 'login' now doesn't directly call
  self.setState(), it instead calls self.handleLogin(), which in turn
  should call self.setState() or whatever it wants. For some reason,
  this works. I have no idea why, but whatever...
add RouteMixin to change title for each route
implement RequireLoginMixin, use on Search route
implement HideWhenLoggedInMixin & use it for Register & Login
don't require login for Search route anymore
redirect to home when logged out from "require login" route