Yes, you can do that. It's called "First Click for Free for Web Search."
This seems like a subjective question/answer, but your intent is not to deceive here. No doubt, the fear is rooted in having something different for the spider than you normally serve to a user, but you:
a.) need to get your content spidered
b.) need to have users login (based on your business rules)
What you're doing is referred to by some as "cloaking" and that's not allowed because of the usual blackhat intent of most cloaking efforts (i.e. maximize SEO juice for the spiders, but do something less for real users).
There is a post on the Google Webmaster Central Blog about this:
http://googlewebmastercentral.blogspot.com/2008/10/first-click-free-for-web-search.html
So, go for it!