Fixing login flow and travis tests