refactored server.js, preparing for login!!