Merge pull request #8 from mixkorshun/master

Authentication rewriting