title: How to make user login from only one device at a time
body: <p>I have a RestAPI which when hit authenticate the user.
  This api is exposed to android and ios developers they hit this api to allow user to login to our app</p>
  
  <p>My requirement is this.1) If user has cell phone say abc phone with IMEI "abc1234". He logs in from this phone. Now if he tries to log in from his 2nd phone than he should not be allowed to login from 2nd phone. He should first log out from abc device.</p>
  
  <p>now there is few complications
  1) if user is logged from abc. With out loging out he formats his phone or uninstalls the app.   Then how should I handle login from same device or other device.</p>
  
  <p>Basically I want to know about strategies or good practises for such type of scenarios.</p>