added validations to user and micropost models