Logut function implemented