fixed some errors with auth