Adding login to api