restoring posts_controller API for login; initializing template for categories_controller API