adding API methods to register and authenticate users