reworked sign in form and added flash messages