add token based login logic