Add server application button and logic, then fix bug