added auth result check