fixed input cursor position not current in chrome
add expire time for logging cookie
fixed bugs