adjust js to handle model message for cleint login