added logout functionality to prevent "invalid credits given" message since PAPI only allows one session at once