Write tokens to session, change debug-output