Implemented Login mechanism. Needs more work but the base is there.