added config and login stuff - still needs some work but mostly functional