chaiwat update function login modal