made provider accessible in user model
updated flash messages