First-time homebuyer's guide to getting a mortgage