Redirect Author Pages if Current User is Not The Author

Hello,
I currently have author pages and I want it so the public cannot access these pages but if the author is logged in they can access that page. Is there anyway to do this?

Thanks!