Switch listener, fixes for login,