Open link as modal form or normal form based on user role I wish to have a link 'Post Ad':

For anonymous user: a modal login form will be displayed to request log in.  

For logged in user: a normal ad posting form.

I managed to use the ctools for modal login form, but i have no idea how to get the normal form to display. (Exception happens when open the normal form, an ajax http error occurred.)

How to achieve this without create two links?

Thanks!
You can look at Menu per Role module, ie link to login form for anonymous users, and link to normal form for authenticated users. another alternative would be to add a hook into the menu in your custom module and change your link based on user's status that way. You can look at this post for info and examples.