Added the logoutAction function.