To make a redirection after user login, we can use the hook hook_user_login().
Note : You cannot use $form_state->setRedirectUrl() directly in the form alter, since it will be overwritten by UserForm::submitForm().
Memcache is caching server allow you to incrise and have great performence on your site. Drupal and memcached work very well and here the full tutorial you need to install and setup memcache server and your drupal instance.
You have several mthodes to override 403 / 404 System pages.
Method 1. Set 403 / 404 pages.
You can set the 403 /404 page on "Basic site settings" page
Admin -> Configuration -> System -> Basic site settings
Path /admin/config/system/site-information