Fixed auth return function