try to use angular to carry out the log in/out function