Implemented Login, and partially other stuff. Also added the Agent framework