create login, some functions for update