extract token method
Session managing