v0.2.0 refactored authentication