Add login ability and corresponding tests
Finish log in/log out