Added a logout function in User