Here's an upvoted comment from progressive Islam.
"I would like to tell you something. Islam does not forbid premarital sex to an extreme extent. You only need some type of document. Now this can be a legalized common law marriage, cohabitation agreement or a Nikah urfi, you need not be necessarily absolutely completely married. However, if you want to do an informal Nikah(not registered in court) and move in together , you are free to do so. I suggest a temporary marriage contract. Lastly, Islam does not prohibit sex , it asks you to do so under some rules and regulations. In the early times, religions such as Judaism and Christianity put high restrictions on sex and absolutely prohibited it, however our religion offered more freedom. Thus there is no need to worry. One more thing , have you taken birth control ? Are you using an IUD or was your boyfriend wearing a condom ? These things are necessary, please take extreme precautions. The reason why our religion asks you to have some sort of contract is because after an act of intimacy , there might be a child and if this kid is born illegitimate he /she might suffer poverty. Thus the progress of a society could be hampered and they might lose a responsible member. Also take a morning after pill. Or drive to the nearest hospital and get an abortion. For now focus on the technicalities , not whether you have sinned or not, there will be time for that, now think about dealing with the repercussions of your actions."