[MOD] Refatoring Login and Logout