added user-connect callback. minor refactoring
updated gitignore