I had a little trouble understanding your first post, and I also don't know how you're querying your DB at present, but you could add something like:
IF(TIMESTAMPDIFF(HOUR, first_time_login_time, NOW()) >= 24, FALSE, TRUE) loginTimeout
to a SELECT query; the 'loginTimeout' pseudo-column would then be a boolean value that indicates whether or not the desired interval has passed.
The same process could be applied to the 'limit just one post in 24 hours' logic as well.