Works with changed api for checking whether user is logged in.