Added refresh user information and added a fix for logout.