Adding flash error handling when user inputs wrong details