Fix local auth

Closes issue #156.