Need to check for client

Otherwise this code will break server side routing. Gaaah ;)