Login and logout mechanism is finished.