added some beginnings to the login/DRM algo. Working further on pathfinding.