login using rest service