Question: This is my `show()` method for `UsersController`

```
import views.html.*;

public static Result show(Long id)
{
  User user = User.findById(id);

  return ok(views.html.users.show.render(user));
}

```

However, IntelliJ marks `show` as red and cannot find the symbol.

I already did `activator compile` and is `target` folder already has object `show.template.scala`. 

Can anyone help me figure out what the problem is and how to fix it?

Answer: 
Because once you authorize the user in the first `if` statement, you fall through and test the second `if` statement. Similarly, if you were to put in invalid credentials, you would get the error message twice (once for the first if/else block and again for the second if/else block).

Try simplifying it a bit:

```
if (pass.equals("mightyducks") && user.equals("alex")) {
    System.out.println("You are now logged into the system!"); 
} else if (user.equals("emily") && pass.equals("cat")) {
    System.out.println("You are now logged into the system!");
} else {
    System.out.println("Your username or password was invalid!");
}

```

There are ways to make that a bit simpler by collapsing the first two tests, but I wanted to keep it this way to illustrate how the if/else parts work.
You may try using `Map` instead and get rid of `multiple if-else` blocks:

```
import java.util.Scanner;
import java.util.Map;
import java.util.HashMap;

class Ideone {

  public static void main(String[] args) {
    Map <String, String> map = new HashMap <String, String> ();
    map.put("alex", "mightyducks");
    map.put("emily", "cat");
    Scanner reader = new Scanner(System.in);
    System.out.println("Type your username:");
    String user = reader.nextLine();
    System.out.println("Type your password:");
    String pass = reader.nextLine();
    reader.close();
    if (null != map.get(user) && map.get(user).equals(pass)) {
      System.out.println("You are now logged into the system!");
    } else {
      System.out.println("Your username or password was invalid!");
    }
  }
}

```

Sample [code works here](https://ideone.com/SowxBV)