fixed auth bugs
Merge pull request #479 from paczian/master

fixed auth bugs