Found it
Problem was caused because of the ipv6 address which wasn't in the pg_hba.conf
PG_hba.conf wasn't accepting the ipv6 addresses I put in. (Have no clue why not)
By putting the next line with localhost instead of the Ip-address in the pg_hba.conf the problem was solved
host all all localhost md5