js update sign in/out