Fixes Issue 30[complete] and Fixes Issue 11[WIP] - locked clients, client-to-server server-side testing

just do it once before the if statement instead of on line 57 and 74