add login and cancel features
Refactory (Code smell)