`<!DOCTYPE html>
<html class="no-js">
...
</body>
</html>
I'm in the process of developing a website where users can enroll in programs by clicking on an "Enroll" button. If the user is already logged in, I want them to be automatically redirected to their profile page instead of the login page. Can anyone provide guidance on how to achieve this? As a novice on stackoverflow, I'm unsure how to properly format my code for sharing. Any assistance would be greatly appreciated.