Improved to use capybara features instead of requests