Fixed the logout issue I was having, it was because of a conditional