added some conditional handling based on remember info is checked or not