Improve login functions
Improve login functions