Take credentials in init
Add tests