fixing user/posts and adding flash messages