halfway implementation of signin and associated tests
Finish sign in and sign out