added login method and config file