Fixed a bug where a failed authentication would cause an internal server error.