<?php

namespace AppBundle\Controller;


use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;

class SecurityController extends Controller
{
    /**
     * @Route("/login-demo", name="login_demo")
     */
    public function demologinAction(Request $request)
    {
        $authenticationUtils = $this->get('security.authentication_utils');

        // get the login error if there is one
        $error = $authenticationUtils->getLastAuthenticationError();

        // last username entered by the user
        $lastUsername = $authenticationUtils->getLastUsername();

        return $this->render('security/login.html.twig', array(
            'dbversion' => $this->container->get('doctrine')->getDefaultConnectionName(),
            'type' => 'organism',
            'last_username' => $lastUsername,
            'error'         => $error,
        ));
    }
}
Add controller for demo user login
Add controller for demo user login
