[eluser]Eric Barnes[/eluser]
To do that you either have to build your own login routine that matches the same cookies/sessions as EE or use hooks with EE and set your login cookies/sessions when they login via the EE side. More than likely you would be better off just converting whatever you are building into an EE plugin/module.