Fixed an error where controller would cause exception if not authenticated