fix flash messages and sign_in redirect
implement search index