It probably is legal. While the law prohibits discrimination against someone because of their religion--so, for example, a secular employer could not fire a Baptist employee due to disapproval of that person's faith--it does not prohibit terminating someone because of disapproval of his/her lifestyle, so long as that lifestyle is not part of the person's religion. Moving in with your boyfriend is not required by any religion (as far as I'm aware); therefore, it would seem to be legal to terminate you for this reason.