Added connect-flash and fixed login