update login and add api things