Fixed the "call to a non member function" happening when switching languages before logging in or on logout issue