fixed player list on lobby (I need a test for that)
moved api support functions to separate file