Multiple bug fixes.
- Replaced 401 errors in most places with self.throwLogin method for better user experience.
- Fixed some odd cookie use cases which could cause connection reset errors.