Can't log in when i rerouted traffic through https instead of http

I rerouted the traffic through https instead of http, because in nextcloud overview gui it said it’s safer, but now i can’t login, i enter the correct username and password, but it says wrong password, why??

I would really appreciate some help

You should not append ?user=admin to your url