Calculate Datetime on shake device & get team

Calculate date time from last history location with new time from
device, if longer than 1 minute make status user Away.
If user change device to login, get team if already have team.