Make addPost work for authentication.