Fixed bug in return of handle for init when authentication failed.