Moved Authentication back to the controller.