fix api login and remove service layer of api and admin