api: register the login resource