Refactor credit request action router (in view file main.html)