added socket support and login security fix