Implemented valid_word

added the logic for the valid_word checker.
Also pulled out the server_info instance from the main thread to
server.h so that it is global for external referencing.