public boolean login() {
		boolean loggedIn = false;
		try {
			loggedIn = mServerInt.login(mUserName, mUserPass, mInstance, ServerInterface.CLIENT);
		} catch(Exception ex){
			if(connect())
				return login();
			System.out.println("A Login-Error occured: " + ex.getMessage());
			return false;
		}
		
		if(loggedIn) {
			mListWindow.setTitle(mUserName);
			mListWindow.setVisible(true);
			HashMap<String, ArrayList<String>> messages = new HashMap<String, ArrayList<String>>();
			try {
				 messages = mServerInt.getMessages(mUserName);
			} catch(Exception ex) {
				System.out.println("Error while receiving messages: " + ex.getMessage());
			}
			
			for(String sender : messages.keySet()) {
				if(sender == null)
					break;
				
				for(String message : messages.get(sender)) {
					try {
						notifyMessage(sender, message);
						mServerInt.deleteMessage(sender, mUserName, message, ServerInterface.CLIENT);
					} catch (RemoteException e) {
						e.printStackTrace();
					}
				}
			}
		}
		return loggedIn;
	}