fixed route and added flask login import
register posts