Device Redirect Based on Token

Token based login and redirect implemented.