disable redirection to a different subdirectory after login

given openproject runs in a subdirectory we cannot allow redirecting to a different subdirectory.
also tries to catch shenanigans to circumvent the check, like ".." in the path.