fixed not logged in issue in rest api