Customer switching costs are an important factor in account-based services such as telecommunications, financial, insurance and brokerage services. In these businesses, existing customers incur significant costs if they switch to another provider. Such costs include physical configuration and installation costs, contractual costs (e.g. termination fees) and cognitive costs of learning. These switching costs enable a firm to extract more revenue from incumbent customers by charging them higher prices. However, higher prices disproportionately deter new customers from buying, because, ex ante, they face similar set-up and learning costs with all providers and hence are more price sensitive. This raises an important question of how best to balance the tradeoff between short-term revenue gains and long-run account growth. We develop an optimal control model to study this tradeoff. We show that a simple target market share policy is the optimal strategy. In particular, there exists a target price and target market share such that the firm should price to reach the target market share as fast as possible, at which point it should switch to the target price. We also examine how these targets change with the competitive outside price, shopping frequency of customers, firm's discount rate and market growth rate. In addition, we extend the basic monopoly model to the duopoly case in which two firms compete for market share and maximize their expected discounted revenue. We also look at the situation in which a firm is able to charge a lower introductory price to attract new customers.