Fixing logged out bug