resolver to check whether user is logged in