consolidated authentication and tokens to single module