Added logout and error login messages using flash now