handling return codes on logging in and posting, with associated status