CakePHP redirect when user go to login page when already logged in
<p>I just want to ask how to redirect a user trying to access the login page even if he's logged in already. I don't have any code to show because I don't even know where to look. </p>

<p>Basically first you go to the login page which is <code>user\login</code> after logging in successfully you get redirected to <code>\profile</code> now if you type in the URL <code>user\login</code> the login form should not be shown and you should be redirected to the profile instead to avoid logging in twice. I hope you understand thank you very much!</p>