Changed authentication to work with custom User models