Why is the login redirecting to the access denied page?
I had the same issue but for Chrome and this was caused by the old cookies since it perfectly worked on the other web browser (Opera). When I've removed old cookies while being on that page, it worked as well.

If this doesn't work on one browser, but not on the other, definitely it's related to the invalid cookies.

If this doesn't work for all web browser, then most likely it's invalid cookie_domain setting in your services.yml file. By default Drupal automatically generates a unique session cookie name based on the full domain name used to access the site and it's sufficient for most cases. However if you're re-using across different subdomains, then you need to set your cookie_domain.