fixes #4: fix authentication
temporarily fix error checking