fix login redirect and post edit format