improve login procudure