Added user api an dimproved the flow of the API