fixed custom rest auth method not working properly