added flash messages. fixed bug with set_sign_in_redirect