add Realm to httpheader request and other fix