Added login and preliminary entity code