Redirect base on identity value

On my login page I am checking if the identity exists, if it does re-direct to the app dashboard page.

If identity is more than or equal to 1 redirect if not say on the login page.

I tried doing it via code as well:
if ( >= 1) {'app/dashboard'}

Community Page
Last updated: