begin signin code
refactoring: remove confusing namespaces
Finish standard signin