Fix login and save errors

fixes #276 and #280