Added function logout