The SEAGrid science gateway provides scientists and educators with user interfaces and tools for conducting computational chemistry, material science, and engineering experiments online using XSEDE and campus computing resources. This paper describes the architecture of the recently completed technology refresh for the gateway, replacing its desktop user interface, adding a web browser user interface, using Apache Airavata middleware for job management, and providing enhanced data search and feature extraction capabilities. These introduce several challenges, particularly in providing unified authentication and authorization mechanisms to middleware services for the desktop and web clients, and in extending Apache Airavata middleware with new components. Access, authentication, and authorization problems were solved by using standard-based approaches (OAuth2, XACML) that were implemented by incorporating WSO2's Identity Server into both SEAGrid and Apache Airavata. SEAGrid-specific data extraction capabilities were added to Airavata middleware using a message-based component approach. This approach is generalizable to other advanced and gatewayspecific capabilities and enables Airavata to add additional data analysis components without modifying its core functionality.