Fix authentication to work with refactored user