Charging batteries while powering device
This is the chip you are looking for: http://www.ti.com/product/bq24079

If you take a special care for the charging(like using smart charger) you decrase the risk of damaging the battery. This chip, both charges the battery and run the system simultaneously.

not: look up the reference design and try to draw the same layout so it will be painless and smooth design.