Add api and login action