public void login(String username, String password) throws SessionException, IOException {
		if ( ! socket.isConnected() ) throw new SessionException("Not Connected!");
		ReadData read = _read2prompt();

        System.out.println(read);

		if ( read.getPrompt().endsWith("User:") ) {
			if ( username == null ) throw new SessionException("Need username to Authenticate");
			_sendln(username);
			_read2prompt();
		}

		if ( read.getPrompt().equals("Password:")) {
			if ( password == null ) throw new SessionException("Need password to Authenticate");
			_sendln(password);
			read = _read2prompt();
		}

		if ( read.getPrompt().endsWith("User:") || read.getPrompt().equals("Password:") ) {
			throw new SessionException("Authentication failed") ;
		} else  {
            cmd("terminal length 0");
			authenticated = true;
		}

	}