@Override
  public void run(){
    ServerLogic sl = new ServerLogic();
    
    try{
      in = new BufferedReader(new InputStreamReader(client.getInputStream()));
      out = new PrintWriter(client.getOutputStream(), true);
    
      //welcome message print
      writeMessage("Welcome to chat server 0.1 beta \n");
      
      System.out.println("User: "+recievedUsername+" logged in with password: "+recievedPassword);
      //KNOWN BUG SEND BUTTON HAS TO BE HIT 2 TIMES
      while (true){
         
        String fullMessage = in.readLine().toString();
        System.out.println("INCOMING: "+fullMessage);
        String[] cutMessage = fullMessage.split("]");
        String forUser = cutMessage[0].replace("[", "");
        /////////////////////////////////////////////////////////////////////////////////////
        //ClientWorker userThread = sl.getThreadFromUser(forUser);
        //ClientWorker userThread = sl.getThreadFromUser("stefan");
        //userThread.writeMessage("testmessage");
       
        System.out.println("Message for user: "+cutMessage[0].replace("[", ""));
        System.out.println("Message: "+cutMessage[1]);
        ////////////////////////////////////////////////////////////////////////////////////
        
        
        /*
        if (in.readLine() == "/getofflineUser") {
            System.out.println("offline user angefordert");
            out.print(sl.getOfflineUsers());
        } 
        if (in.readLine() == "/getonlineUser") {
        
        }
        
        */
              
        writeMessage(recievedUsername+": "+cutMessage[1]);

      }
    } catch (IOException e) {
      System.out.println("in or out failed");
      //System.exit(-1);
    }
  }