added LoginWithAttrs function