Updated the bot_portal controller with appropriate logic from the view.