Firing a function AFTER redirect
Add a nonce to your redirect url. See the examples in the codex for wp_nonce_url(). Use wp_verify_nonce() to check for the nonce and run your function to load the modal. You might also want to check if is_user_logged_in() in this case.