Added redirections in sign up and sign in

Also flash messages in case of error