Make login use SQLAlchemy based code.