Added login using middleleware and jade if