add function to check if a user is logged in, implement logout
add flag to force authentication, not sure how that can be used in a meaningful way...