Better API for auth - Fix #79