server refactor
authentication built