refactoring server config, login implemented at the server