made index.php immediately redirect to app if user already logged in