Better (and prettier) error handling. Also cache-clearing on login.