Created association between users and posts and created helper methods