title: password_auth.py mushroom cloud error on Airflow webserver open when switching backend DBs
body: <p>Trying to transition from sqlite db to postgresql (based on the guide here: <a href="https://www.ryanmerlin.com/2019/07/apache-airflow-installation-on-ubuntu-18-04-18-10/" rel="nofollow noreferrer">https://www.ryanmerlin.com/2019/07/apache-airflow-installation-on-ubuntu-18-04-18-10/</a>  ) and getting mushroom cloud error at initial screen of webserver UI.</p>
  
  <pre class="lang-sh prettyprint-override"><code>Traceback (most recent call last):
    File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
      response = self.full_dispatch_request()
    File "/home/airflow/.local/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
      rv = self.handle_user_exception(e)
    ...
    ...
    File "/home/airflow/.local/lib/python3.6/site-packages/airflow/www/utils.py", line 93, in is_accessible
      (not current_user.is_anonymous and current_user.is_superuser())
    File "/home/airflow/.local/lib/python3.6/site-packages/airflow/contrib/auth/backends/password_auth.py", line 114, in is_superuser
      return hasattr(self, 'user') and self.user.is_superuser()
  AttributeError: 'NoneType' object has no attribute 'is_superuser'
  </code></pre>
  
  <p>Looking at the webserver logs does not reveal much...</p>
  
  <pre class="lang-sh prettyprint-override"><code>[airflow@airflowetl airflow]$ tail airflow-webserver.*
  ==&gt; airflow-webserver.err &lt;==
  /home/airflow/.local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: &lt;http://initd.org/psycopg/docs/install.html#binary-install-from-pypi&gt;.
    """)
  
  ==&gt; airflow-webserver.log &lt;==
  
  ==&gt; airflow-webserver.out &lt;==
  [2019-12-18 10:20:36,553] {settings.py:213} INFO - settings.configure_orm(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=72725
  
  ==&gt; airflow-webserver.pid &lt;==
  72745
  </code></pre>
  
  <p>One thing that may be useful to note (since this appears to be due to some kind of password issue) is that before trying to switch to postgres, I had set bycrpt password according to the docs (<a href="https://airflow.apache.org/docs/stable/security.html#password" rel="nofollow noreferrer">https://airflow.apache.org/docs/stable/security.html#password</a>) with the script here:</p>
  
  <pre class="lang-py prettyprint-override"><code>import airflow
  from airflow import models, settings
  from airflow.contrib.auth.backends.password_auth import PasswordUser
  
  user = PasswordUser(models.User())
  user.username = 'airflow'
  user.email = 'myemail@co.org'
  user.password = 'mypasword'
  
  session = settings.Session()
  session.add(user)
  session.commit()
  session.close()
  exit()
  </code></pre>
  
  <p>Anyone know what could be going on here or how to debug further?</p>