Throw AuthenticationException instead of Exeption
Change "Username" to UserName
Comply with most of Code Analysis guidelines

This commit contains some breaking changes. This will be mentioned in
the release notes.