Added logout
Added finish on game end
Added logout functions