Rstudio Server: Error: Incorrect or invalid username/password


I wanted to try out Rstudio server but I am having problems with the authentication. I am able to successfully connect from localhost to remote server (with Rstudio server on it) using ssh and trafficing the remote 8787 port to my localhost:1277.
But I am not able to connect with username & password I am using on the remote server. I also tried to create a new user (via useradd) but the problem persists Error: Incorrect or invalid username/password.

The userid should be in the required range. Also the users have their home directory.

The etc/pam.d/login looks like this:

auth [user_unknown=ignore success=ok ignore=ignore default=bad]
auth       substack     system-auth
auth       include      postlogin
account    required
account    include      system-auth
password   include      system-auth
# close should be the first session rule
session    required close
session    required
session    optional
# open should only be followed by sessions to be executed in the user context
session    required open
session    required
session    optional force revoke
session    include      system-auth
session    include      postlogin
-session   optional

I have copied it to etc/pam.d/rstudio per instruction.

The pamtester is not available in the free version of RStudio Server.
Any idea?