added "ON DUPLICATE KEY UPDATE" to handle a weird bug (signin)