You aren't running this with any command line parameters, are you? Verify that you actually have a first parameter before you try performing checks on it. For example:
if(args.length > 0 && !args[0].equals("loggedIn")){
The above implies you don't want to call launch()
if there are no parameters (your question is a bit vague on this, but this would be a strict interpretation). If you do want to call launch()
in this case, do the following:
if(!(args.length > 0 && args[0].equals("loggedIn"))){