Resolved possible deadlock on UsernamePasswordAsync and massive unit test refactoring