moved user and post from routes to controllers