i am not checking this at client side i am checking client address at server side and make changes at server side.
Because of our employee work from Home and the security reason we kept those login ip in Mysql server and next time we only allow from that ip next one is we monitor there working hour also
Login history is already tracked:
hence we make come changes in .JS file
Such tracking and enforcement can only safely be done server-side.