updating with flash messages, adding register and login templates and integrating flask alchemy